package test.my.com.myapplicationtest.image_container;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;

import test.my.com.myapplicationtest.R;

/**
 * Created by ThinkPad on 2016/2/17.
 */
public class ImageContainerActivity extends Activity {


    private ImageContainer mImage_ic;
    private int[] images = {R.drawable.ccc,R.drawable.aa,R.drawable.aa,
                            R.drawable.aa,R.drawable.bb,R.drawable.banner,
                            R.drawable.banner,R.drawable.aa,R.drawable.bb,
                            R.drawable.aa};
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.aty_image_container_layout);
        mImage_ic = (ImageContainer) findViewById(R.id.mImage_ic);
        mImage_ic.setImagesArray(images);
        mImage_ic.setmOnImageClickListener(new ImageContainer.OnImageClickListener() {
            @Override
            public void imageClick(int position) {
                Toast.makeText(ImageContainerActivity.this,"position == "+position,Toast.LENGTH_SHORT).show();
            }
        });
    }
}
